package com.witmore.neutron.ai.db.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Getter;
import lombok.Setter;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * <p>
 * 插件基础信息表
 * </p>
 *
 * @author 豆子高
 * @since 2025-06-30
 */
@Getter
@Setter
@TableName("neutron_plugin")
public class PluginDO implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    /**
     * 插件编码
     */
    @TableField("plugin_code")
    private String pluginCode;

    /**
     * 插件名称
     */
    @TableField("plugin_name")
    private String pluginName;

    /**
     * 插件描述
     */
    @TableField("plugin_desc")
    private String pluginDesc;

    /**
     * 插件类型(1:HTTP 2:MCP 3:内置)
     */
    @TableField("plugin_type")
    private Integer pluginType;

    /**
     * 插件图标
     */
    @TableField("plugin_icon")
    private String pluginIcon;

    /**
     * 插件版本
     */
    @TableField("plugin_version")
    private String pluginVersion;

    /**
     * 插件配置JSON Schema
     */
    @TableField("plugin_config_schema")
    private String pluginConfigSchema;

    /**
     * 插件认证配置JSON Schema
     */
    @TableField("plugin_auth_schema")
    private String pluginAuthSchema;

    /**
     * 插件执行类(内置插件使用)
     */
    @TableField("plugin_executor_class")
    private String pluginExecutorClass;

    @TableField("plugin_inputType")
    private String pluginInputType;

    /**
     * 是否系统内置插件
     */
    @TableField("is_system")
    private Boolean isSystem;

    /**
     * 是否启用 0否 1是
     */
    @TableField("enabled")
    private Integer enabled;

    @TableField("update_time")
    private LocalDateTime updateTime;

    @TableField("create_time")
    private LocalDateTime createTime;

    @TableField("plugin_category")
    private Integer pluginCategory;

    @TableField("plugin_label")
    private String pluginLabel;

    /**
     * 所属插件组编码
     */
    @TableField("group_code")
    private String groupCode;

    /**
     * 组内展示排序（越小越靠前）
     */
    @TableField("sort_order")
    private Integer sortOrder;

    /**
     * 插件使用一次 消耗的次数
     */
    @TableField("usage_count")
    private Integer usageCount;
}
